home *** CD-ROM | disk | FTP | other *** search
- Program CopyRight;
-
- { This program allows you to insert your personal CopyRight notice }
- { into a Turbo Pascal .COM, .CHN, or overlay file (.00?). }
- { It overwrites the Borland CopyRight notice. }
- { This program has only been tested on an MSDOS machine with }
- { Turbo Pascal version 3.0. Thus, we are actually editing an }
- { object code file. Have fun with it. Regards - Wm. Mabee, CRNA }
-
- Const
- { Fill note with the notice you wish to use. If your notice does }
- { not completly fill 'Note' complete the line with spaces. }
-
- (* ' ' *)
-
- Note = 'Copyright (C.) 1987 John Q. Public (***) ***-**** ';
-
- Var
-
- TestChar : Char;
- FileName : String[14];
- FileVar : File Of Char;
- I : Integer;
- WriteStr : String[100];
-
- Begin
-
- WriteStr := Note;
-
- ClrScr;
- GotoXY(1,1);
- WriteLn('This program writes my CopyRight notice into a Turbo Pascal');
- WriteLn('program. To exit enter a null string when prompted for name');
- WriteLn('of the Turbo Pascal file to process.');
-
- Gotoxy(1,4);
- Write('Enter Name Of File : ');
- ReadLn(FileName);
-
- While FileName <> '' Do
- Begin
-
- Assign(FileVar,FileName);
- Reset(FileVar);
-
- { Advance pointer to the address of Borland CopyRight. }
-
- For I := 1 To 7 Do Read(FileVar,TestChar);
-
- { Write in new copyright notice. Use a string length of 100 bytes to }
- { remove Borland's notice and info regarding type of monitor that was }
- { used when the program was first compiled. }
-
- For I := 1 To 100 Do Write(FileVar,WriteStr[I]);
-
- Close(FileVar);
-
- GotoXY(1,4);
- Write('Enter Name Of File : ');
- GotoXY(22,4);
- ClrEol;
- ReadLn(FileName);
-
- End;
-
- End.